package com.woniuxy.java102vuecli.mapper;

import com.woniuxy.java102vuecli.entity.Menu;
import com.woniuxy.java102vuecli.entity.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author author
 * @Create 2023-09-14 11:06
 */
public interface RoleMapper {
    //根据菜单id，查询引用了该菜单的角色
    List<Role> selectRolesByMid(int mid);
    List<Role> selectAllRoles();

    //查询指定角色分配的所有菜单
    List<Menu> selectMenussByRid(int rid);

    void deleteMenusByRid(Integer rid);

    void insertMeuesByRid(@Param("rid") Integer rid,@Param("mids") int[] mids);
}